package grafoS;

import java.util.LinkedList;

/**
 * Gcol is a program to help users to learn a little about graph coloring, in
 * this software, you can learn some coloring algorithms, and add your own
 * algorithm for coloring.You can also learn BFS and DFS search. This tool, also
 * support the .col format from DIMACS (Center for Discrete Mathematics and
 * Theoretical Computer Science), so you can import a big graph and use all the
 * algorithms. Copyright (C) <2015> Clóvis Daniel Souza Silva, Samuel Silva de
 * Souza, Professor Leonardo Sampaio Rocha.
 * 
* This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
* This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
* You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 * 
 * contact: projetoGrafos@gmail.com
 */
/**
 *
 * @author Daniel
 * @author Samuel
 */
/**
 * A simple queue.
 */
public class Fila {

    private LinkedList<Vertice> vertice = new LinkedList<Vertice>();

    /**
     * insert method.
     *
     * @param v vertex to insert.
     */
    public void insere(Vertice v) {
        this.vertice.add(v);
    }

    /**
     * remove method.
     *
     * @return deleted vertex.
     */
    public Vertice remove() {
        return this.vertice.remove(0);
    }

    /**
     * empty method.
     *
     * @return true if empty.
     */
    public boolean vazia() {
        return this.vertice.size() == 0;

    }

}
